import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);

const routes = [
  {
    path:"/login",
    component:()=>import("../views/login/login.vue")
  },
  {
    path:"/main",
    component:()=>import("../views/main/main.vue"),
    children:[
      {
        path:"good",
        component:()=>import("../views/good/index.vue")
      },
      {
        path:"category",
        component:()=>import("../views/category/index.vue")
      },
      {
        path:"customer",
        component:()=>import("../views/customer/index.vue")
      },
      {
        path:"supplier",
        component:()=>import("../views/supplier/index.vue")
      }

    ]
  }

];

const router = new VueRouter({
  mode:"history",
  routes
});

export default router
